<%@ page language="java" import="com.bean.*,com.dao.*,java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
   // int id=Integer.parseInt(request.getParameter("id"));
   String username=session.getAttribute("username").toString();
   String password=session.getAttribute("password").toString();
    
    UserDao user=new UserDao();
    UserBean bean=user.login(username, password);
    int id=bean.getId(); 
    session.setAttribute("userId",id);
    session.setAttribute("dizhi", bean.getAddress());
    HonourDao hdao=new HonourDao();
    List<HonourBean> hon1=hdao.selectInfoByUserId(id, 2);
    List<HonourBean> hon2=hdao.selectInfoByUserId(id, 2, 100);
    PictureDao pdao=new PictureDao();
    List<PictureBean> pic=pdao.selectMy(id, "mymien");
    PictureBean pbean =pdao.selectOne(id,id);
    MymienDao miendao=new MymienDao();
    List<MymienBean> mienbeans=miendao.SelectAll(1, id);
    session.setAttribute("username", username);
    String picpath=pbean.getPicturePath();
    System.out.println("picpath:"+picpath);
    session.setAttribute("picpath",picpath);
    request.setAttribute("userbean",bean);
    PlateDao pldao=new PlateDao();
    int r=pldao.selOne(username);
    session.setAttribute("r", r);
 %>
<strong> 
<!DOCTYPE html>
	<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
			<title><%=bean.getName()%></title>
			<meta
				content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
				name="viewport">
			<meta content="telephone=no" name="format-detection">
			<meta content="yes" name="apple-mobile-web-app-capable">
			<meta content="black" name="apple-mobile-web-app-status-bar-style">
			<link rel="stylesheet" href="css/phone.css" type="text/css">
			<script type="text/javascript" src="js/jquery.min.js"></script>
			<!-- Cdn fail refers to local library -->
			<script type="text/javascript">
        if (typeof jQuery == 'undefined') {
            document.write(unescape("%3Cscript src='../js/jquery-1.11.1.min.js' type='text/javascript'%3E%3C/script%3E"));
        }
    </script>

		<script src="js/jweixin-1.0.0.js"></script>
		
</head>
	<body>
		<div class="aspNetHidden">
           </div>
             <div class="aspNetHidden">

			</div>
			<div class="fimg dn">
				<img width="1" height="1" src="img/201507202058239699968645.jpg">
			</div>
			<div class="dimg">
				<img width="222" src=".${sessionScope.picpath}">
				<div class="arrow"></div>
			</div>
			<div class="wrapouter">
				<div class="wrap colorwhite">
					<a class="a-icon a-play a-stop"></a>
					<a class="a-icon a-vol a-novol"></a>
					<audio id="car_audio" loop="loop" src="../image/bg.mp3"></audio>
					<div class="v_title">
						About Me
		</div>
					<div class="fclear"></div>
					<div class="v_name">
						<%=bean.getName() %>
						<span><%=bean.getPost() %></span>
					</div>
					<div class="v_info mt20">
						<div class="v_info_i i0">
							公司：<%=bean.getCompanyName() %>
						</div>
						<div class="v_info_i i1">
							手机：<%=bean.getTel() %>
						</div>
						<div class="v_info_i i2">
							微信：<%=bean.getWeiXinHao() %>
						</div>
						<div class="v_info_i i3 dn">
							QQ：
						</div>
						<div class="v_info_i i4">
							邮箱：<%=bean.getEmail() %>
						</div>
						<div class="v_info_i i5">
							地址：<%=bean.getAddress() %>
						</div>
					</div>
					<div class="v_title">
						荣誉历程
					</div>
					<div class="v_honor mt20">
						<ul>
						     <c:forEach var="hon" items="<%=hon1 %>">
								<li><p><i>★</i>${hon.info}</p></li>
						     </c:forEach>
								
						</ul>
						<div class="honor_div minheight" id="div1">
							<ul>
								<c:forEach var="hon" items="<%=hon2 %>">
								<li><p><i>★</i>${hon.info}</p></li>
						     </c:forEach>
							</ul>
						</div>
						
						<div class="more_honor">
							<span class="more_honor_a more_honor_a1">查看更多</span>
						</div>
					</div>
					<div class="v_title">
						我的风采
					</div>
					<div class="v_honor mt20">
					   <c:set var="index" value="0"></c:set>
                       <c:forEach var="pic" items="<%=mienbeans %>" end="${exitId }">
						<c:set var="index" value="${index+1 }" />
						<c:if test="${index>1 }">
						  <c:set var="exitId" value="0"/>
						</c:if>
						<div class="v_honor_i">
							<a href="ShowMyPicture.pic?lujing=wodefengcai111.jsp"> <img
									src=".${pic.picturePath}"> </a>
						</div>
						</c:forEach>
					</div>
					<div class="v_title">
						理财中心${pic.picturePath}
					</div>
					<div class="v_lczx mt20" id="div2">
					
	                  <c:forEach var="modu" items="${requestScope.beans }">
	                  	<c:choose>
	                  	<c:when test="${modu.id==8}">
	                  		<a href=http://www.weixingongzuoshi.com/weizhan/dizhi.aspx?dizhi=<%=bean.getAddress() %> id="${modu.name}">${modu.name}</a>
	                  	</c:when>
	                  	<c:otherwise>
	                  		<a href="${modu.alias}" id="${modu.name }">${modu.name }</a>
	                  	</c:otherwise>
	                  	</c:choose>
						
						
					  </c:forEach>
						<!-- <a href="ShowUser.user?lujing=wodemingpian.jsp&id=<%=bean.getId() %>">我的名片</a><a href="gongsijieshao.jsp">公司介绍</a>
						<a href="remaichanpin.jsp">热卖产品</a><a href="chengpinyingcai.jsp">诚聘英才</a>
						<a href="sirendingzhi.jsp">私人定制</a><a href="baodannianjian.jsp">保单年检</a>
						<a href="http://www.weixingongzuoshi.com/weizhan/dizhi.aspx?dizhi=<%=bean.getAddress() %>">公司地址</a>
						 <a href="geiwoliuyan.jsp">给我留言</a>

						<a href="shenghuofuwu.html">生活服务</a><a href="htlogin.jsp">我的后台</a>
						<a href="meirizixun.jsp">每日资讯</a><a href="ShowMymien.mien?lujing=wodefengcai.jsp&typeId=1">我的风采</a><a
							href="ShowMymien.mien?lujing=wodefenxiang.jsp&typeId=2">我的分享</a><a
							href="ShowMymien.mien?lujing=team.jsp&typeId=3">我的团队</a><a
							href="ShowMymien.mien?lujing=wodeshejiao.jsp&typeId=4">我的社交</a>
						<a href="weichoujiang.jsp">微抽奖</a><a href="ShowActivity.act?lujing=weihuodong.jsp">微活动</a>
						<a href="zhuanjiatanbaoxian.jsp">专家谈保险</a>
						 -->
						<div class="clr"></div>


					</div>
					<div class="v_map">
						<iframe src="http://www.weixingongzuoshi.com/weizhan/dizhi.aspx?dizhi=<%=bean.getAddress() %>" scrolling="no"
							style="width: 100%; height: 250px;"></iframe>

					</div>
					<div style="height: 300">
					<%@ include file="liuyan.jsp" %>
					</div>

                 <script type="text/javascript" src="js/liuyanban.js"></script>
               <c:forEach var="modu" items="${requestScope.beans}">
                 <c:choose>
                   <c:when test="${modu.show==0 }">
                     
                 <script type="text/javascript">
                    $(document).ready(function(){
						$("#${modu.name }").toggle(function(){ 
						   $("#${modu.name }").hide();
						});
                    });

                 </script>
                   </c:when>
                 </c:choose>	
               </c:forEach>				
					<script type="text/javascript">
         $(document).ready(function(){
       		$("#div1").hide();
    	});
        $(function () {
            
            $(".more_honor").click(function () {
            	
                if ($(".honor_div").hasClass("minheight")) {                    
                    $(".honor_div").removeClass("minheight");
                    $(".honor_div").addClass("autoheight");
                    $(".more_honor_a").removeClass("more_honor_a1");
                    $(".more_honor_a").addClass("more_honor_a2");
                    $(".more_honor_a").html("点击收起");
                }
                else {
                    $(".honor_div").removeClass("autoheight");
                    $(".honor_div").addClass("minheight");                    
                    $(".more_honor_a").removeClass("more_honor_a2");
                    $(".more_honor_a").addClass("more_honor_a1"); $(".more_honor_a").html("查看更多");
                }
                $div1=$('#div1');
				if($div1.is(':hidden')){
				$div1.show();
				}else if($div1.is(':visible')){
				$div1.hide();
				} 
            });
            });
         
    </script>


				</div>
			</div>

			<%@include file="menu.jsp"%>

		</body>
	</html> 
	
</strong>